<?php
/**
 * Created by PhpStorm.
 * User: lili
 * Date: 2018/11/16
 * Time: 20:44
 */

namespace app\index\validate;


use think\Validate;

class Beginningtreatment extends Validate
{
    protected $rule = [
        'uid' => 'require',
        'hospital' => 'require',
        'insulin' => 'require|in:1,2',
        'insulinamountday' => 'require|float',
        'baseinsulin' => 'require|float',
        'beforeeatinsulin' => 'require|float',
        'sulin0003' => 'require|float',
        'sulin0307' => 'require|float',
        'sulin0712' => 'require|float',
        'sulin1217' => 'require|float',
        'sulin1722' => 'require|float',
        'sulin2224' => 'require|float',
        'breakfastsulin' => 'require|float',
        'lunchsulin' => 'require|float',
        'dinnerinsulin' => 'require|float',
        'isotherdisease' => 'require|in:1,2',
//        'otherdisease' => 'require'



    ];

    protected $message  =   [
        'uid.require' => '用户id必须',
        'hospital.require' => '就诊医院必须',
        'insulin.require' => '胰岛素类型必须',
        'insulin.in' => '胰岛素类型必须1或者2,1/速效胰岛素（超短效胰岛素）2/短效胰岛素（常规胰岛素）',
        'insulinamountday.require' => '每天胰岛素总量必须',
        'baseinsulin.require' => '基础率总量必须',
        'beforeeatinsulin.require' => '餐前大剂量总量必须',
        'sulin0003.require' => '0点到3点胰岛素输入量必须',
        'sulin0307.require' => '3点到8点胰岛素输入量必须',
        'sulin0712.require' => '8点到12点胰岛素输入量必须',
        'sulin1217.require' => '12点到16点胰岛素输入量必须',
        'sulin1722.require' => '16点到20点胰岛素输入量必须',
        'sulin2224.require' => '20点到24点胰岛素输入量必须',
        'breakfastsulin.require' => '早餐胰岛素用量必须',
        'lunchsulin.require' => '午餐胰岛素用量必须',
        'dinnerinsulin.require' => '晚餐胰岛素用量必须',
        'isotherdisease.require' => '是否糖尿病以外的病必须',
        'insulinamountday.float' => '每天胰岛素总量必须为浮点数',
        'baseinsulin.float' => '基础率总量必须为浮点数',
        'beforeeatinsulin.float' => '餐前大剂量总量必须为浮点数',
        'sulin0003.float' => '0点到3点胰岛素输入量为浮点数',
        'sulin0308.float' => '3点到8点胰岛素输入量为浮点数',
        'sulin0812.float' => '8点到12点胰岛素输入量为浮点数',
        'sulin1216.float' => '12点到16点胰岛素输入量为浮点数',
        'sulin1620.float' => '16点到20点胰岛素输入量为浮点数',
        'sulin2024.float' => '20点到24点胰岛素输入量为浮点数',
        'breakfastsulin.float' => '早餐胰岛素用量为浮点数',
        'lunchsulin.float' => '午餐胰岛素用量为浮点数',
        'dinnerinsulin.float' => '晚餐胰岛素用量为浮点数',
        'isotherdisease.in' => '是否糖尿病以外的病，1为是 2为不是',
//        'otherdisease.require' => '糖尿病以外的病'

    ];
}